first points down the TEST/TS_CALIBRATE.C program in the Tslib library to remove the Display section (Display the Calibration point cross Box) and the code below.
typedef struct {int x[5], xfb[5];
int y[5], yfb[5];
int a[7];
} calibration;
int perform_calibration (calibration *cal) {int J;
float n, x, y, x2, y2, XY, Z, ZX, Zy;
Float Det, A, B, C, E, F, I;
float scaling = 65536.0;
...
}
static void Get_sample (struct Tsdev *ts, calibration *cal, int index, int x, int
// Source file// If (calfile = getenv ("tslib_calibfile "))! = NULL ){// Cal_fd = open (calfile, o_creat | o_rdwr );//} Else {// Cal_fd = open ("/etc/pointercal", o_creat | o_rdwr );//}// You need to change it to the following format:If (calfile = getenv ("tslib_calibfile "))! = NULL ){Cal_fd = open (calfile, o_creat
1218 Reward: 5Programming languagesThe final contents of the terminal are as follows:In function 'open',inlined from 'main'atts_calibrate.c:227:/usr/include/bits/fcntl2.h:51:error:call to '__open_missing_mode'declared with Attribute Error:open with O_creat in second argument needs 3 argumentsIn function 'open',inlined from 'main'atts_calibrate.c:229:/usr/include/bits/fcntl2.h:51:error:call to '__open_missing_mode'declared with Attribute Error:open with O_creat in second argument needs 3 argumen
error: open with o_creat in second argument needs 3 argumentsMake [2]: *** [ts_calibrate.o] Error 1
This is because the OPEN function syntax does not comply with the latest GCC, and the third parameter of open is added to/tests/ts_calibrate.c:
12345
if ((calfile = getenv("TSLIB_CALIBFILE")) != NULL) {cal_fd = open (calfile, O_CREAT | O_RDWR, 0777);} else{cal_fd = open ("/etc/pointercal", O_CRE
for calibration. If the calibration succeeds, an interface is displayed, and you are asked to click the cross symbol to generate the/etc/pointercal file, this is the calibration configuration file for the touch screen.Problems:1. Error in autogen, prompt
./Autogen. sh: 4: autoreconf: not found
This is because automake is not installed in the system.?
1
aptitudeinstall autoconf automake libtool
2. An error occurred while making. The prompt is displayed.
In function 'open '
/fcntl2.h:51:error:call to ' __open_missing_mode ' declared with attribute error:open with O_CREAT in SE Cond argument needs 3 argumentsWorkaround:sudo vim/home/loongson/workspace/tslib/tests/ts_calibrate.c +227 will cal_fd = open (Calfile, O_creat | O_RDWR); insteadCAL_FD = open (Calfile, O_creat | o_rdwr,0666);229 rowsCAL_FD = open ("/etc/pointercal", O_creat | O_RDWR);Change to CAL_FD = open ("/etc/point
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.